﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using SmartyOcr;
namespace Lab
{
    public class ImageCreator
    {
        public static void Draw(string names) {
            using (Bitmap map = new Bitmap(100, 100))
            {
                using (Graphics graph = Graphics.FromImage(map))
                {
                    using (Brush redBrush = Brushes.Red)
                    {
                        var whiteBrush = Brushes.White;
                        graph.FillRegion(whiteBrush, new Region(new Rectangle(0, 0, map.Width, map.Height)));
                        graph.DrawString(names, new Font("宋体 常规", 24), redBrush, 0, 10);
                        map.Save("./line.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
                    }
                }
            }
        }
        public static void Study() {
            Student stu = new Student();
            stu.Study("./xue.png", "￥123.10");
        }
    }
}
